<template>
    <div>
        <!--全局加载框-->
        <div v-show="loadVisible" class="load-tips  load-position">
            <div class="spinner">
                <div class="spinner-container container1">
                    <div class="circle1"></div>
                    <div class="circle2"></div>
                    <div class="circle3"></div>
                    <div class="circle4"></div>
                </div>
                <div class="spinner-container container2">
                    <div class="circle1"></div>
                    <div class="circle2"></div>
                    <div class="circle3"></div>
                    <div class="circle4"></div>
                </div>
                <div class="spinner-container container3">
                    <div class="circle1"></div>
                    <div class="circle2"></div>
                    <div class="circle3"></div>
                    <div class="circle4"></div>
                </div>
            </div>
            <span>加载中</span>
        </div>
        <!-- 全局提示框 -->
        <div v-show="totalVisible" class="total-tips dialog-position">
            <div class="msg">{{totalMessage}}</div>
        </div>
    </div>

</template>
<script>
  export default {
    data() {
      return {
        totalVisible: false,
        totalMessage: "",
        loadVisible:false,
      };
    }
  };
</script>
<style>
    .load-tips{
        position: fixed;
        z-index: 100;
        width: 5rem;
        height: 5rem;
        border-radius: 0.2rem;
        text-align: center;
        white-space: nowrap;
        background-color: #a6a6a6d9;
        -webkit-box-shadow: 0px 8px 15px 0 rgba(0, 0, 0, 0.1);
        box-shadow: 0px 8px 15px 0 rgba(0, 0, 0, 0.1);
    }
    .load-tips span{
        font-size: 0.7rem;
        padding-top: 0.8rem;
        display: block;
    }
    .load-position{
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%)
    }

    .total-tips{
        position: fixed;
        z-index: 100;
        padding: 0.3rem;
        min-width: 3rem;
        border-radius: 0.2rem;
        white-space: nowrap;
        background-color: #a6a6a6d9;
        -webkit-box-shadow: 0px 8px 15px 0 rgba(0, 0, 0, 0.1);
        box-shadow: 0px 8px 15px 0 rgba(0, 0, 0, 0.1);
        text-align: center;
    }
    .total-tips .msg{
        height: 1.2rem;
        line-height: 1.2rem;
        font-size: 0.7rem;
    }
    .dialog-position {
        top: 80%;
        left: 50%;
        transform: translate(-50%, -50%)
    }
    /*动画*/
    .spinner {
        width: 2rem;
        height: 2rem;
        position: relative;
        margin: 0 auto;
        margin-top: 1rem;
    }

    .container1 > div, .container2 > div, .container3 > div {
        height: 0.3rem;
        width: 0.3rem;
        background-color: #333;

        border-radius: 100%;
        position: absolute;
        -webkit-animation: bouncedelay 1.2s infinite ease-in-out;
        animation: bouncedelay 1.2s infinite ease-in-out;
        -webkit-animation-fill-mode: both;
        animation-fill-mode: both;
    }

    .spinner .spinner-container {
        position: absolute;
        width: 100%;
        height: 100%;
    }

    .container2 {
        -webkit-transform: rotateZ(45deg);
        transform: rotateZ(45deg);
    }

    .container3 {
        -webkit-transform: rotateZ(90deg);
        transform: rotateZ(90deg);
    }

    .circle1 { top: 0; left: 0; }
    .circle2 { top: 0; right: 0; }
    .circle3 { right: 0; bottom: 0; }
    .circle4 { left: 0; bottom: 0; }

    .container2 .circle1 {
        -webkit-animation-delay: -1.1s;
        animation-delay: -1.1s;
    }

    .container3 .circle1 {
        -webkit-animation-delay: -1.0s;
        animation-delay: -1.0s;
    }

    .container1 .circle2 {
        -webkit-animation-delay: -0.9s;
        animation-delay: -0.9s;
    }

    .container2 .circle2 {
        -webkit-animation-delay: -0.8s;
        animation-delay: -0.8s;
    }

    .container3 .circle2 {
        -webkit-animation-delay: -0.7s;
        animation-delay: -0.7s;
    }

    .container1 .circle3 {
        -webkit-animation-delay: -0.6s;
        animation-delay: -0.6s;
    }

    .container2 .circle3 {
        -webkit-animation-delay: -0.5s;
        animation-delay: -0.5s;
    }

    .container3 .circle3 {
        -webkit-animation-delay: -0.4s;
        animation-delay: -0.4s;
    }

    .container1 .circle4 {
        -webkit-animation-delay: -0.3s;
        animation-delay: -0.3s;
    }

    .container2 .circle4 {
        -webkit-animation-delay: -0.2s;
        animation-delay: -0.2s;
    }

    .container3 .circle4 {
        -webkit-animation-delay: -0.1s;
        animation-delay: -0.1s;
    }

    @-webkit-keyframes bouncedelay {
        0%, 80%, 100% { -webkit-transform: scale(0.0) }
        40% { -webkit-transform: scale(1.0) }
    }

    @keyframes bouncedelay {
        0%, 80%, 100% {
            transform: scale(0.0);
            -webkit-transform: scale(0.0);
        } 40% {
              transform: scale(1.0);
              -webkit-transform: scale(1.0);
          }
    }
</style>